/* ========= 主界面风格统一 ========= */
.main-container {
    -fx-background-color: #f5f9ff;
}

.header-box {
    -fx-background-color: #1565C0;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 8, 0, 0, 2);
}

.header-title {
    -fx-text-fill: white;
    -fx-font-size: 18px;
    -fx-font-weight: bold;
}

.nav-button {
    -fx-background-color: transparent;
    -fx-text-fill: white;
    -fx-border-color: white;
    -fx-border-radius: 4;
    -fx-padding: 6 12 6 12;
}

.nav-button:hover {
    -fx-background-color: rgba(255,255,255,0.2);
}

.content-box {
    -fx-background-color: white;
    -fx-background-radius: 8;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.08), 8, 0, 0, 2);
}

.section-title {
    -fx-text-fill: #0D47A1;
    -fx-font-size: 16px;
    -fx-font-weight: bold;
}

/* ========= 按钮样式 ========= */
.primary-button {
    -fx-background-color: #1565C0;
    -fx-text-fill: white;
    -fx-font-weight: bold;
    -fx-background-radius: 4;
    -fx-padding: 8 16 8 16;
    -fx-cursor: hand;
}

.primary-button:hover {
    -fx-background-color: #1976D2;
}

.secondary-button {
    -fx-background-color: #e3f2fd;
    -fx-text-fill: #1976D2;
    -fx-font-weight: bold;
    -fx-background-radius: 4;
    -fx-padding: 8 16 8 16;
    -fx-cursor: hand;
}

.secondary-button:hover {
    -fx-background-color: #bbdefb;
}
.info-button {
    -fx-background-color: green;
    -fx-text-fill: white;
    -fx-font-weight: bold;
    -fx-background-radius: 4;
    -fx-padding: 8 16 8 16;
    -fx-cursor: hand;
}
.danger-button {
    -fx-background-color: #ff5252;
    -fx-text-fill: white;
    -fx-font-weight: bold;
    -fx-background-radius: 4;
    -fx-padding: 8 16 8 16;
    -fx-cursor: hand;
}

.danger-button:hover {
    -fx-background-color: #d32f2f;
}

.small-button {
    -fx-background-color: #e3f2fd;
    -fx-text-fill: #1976D2;
    -fx-font-size: 12px;
    -fx-background-radius: 3;
    -fx-padding: 4 8 4 8;
    -fx-cursor: hand;
}

.small-button:hover {
    -fx-background-color: #bbdefb;
}

/* ========= 商品卡片样式 ========= */
.product-card {
    -fx-background-color: white;
    -fx-background-radius: 8;
    -fx-border-radius: 8;
    -fx-border-color: #e0e0e0;
    -fx-border-width: 1;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.05), 4, 0, 0, 2);
}

.product-card:hover {
    -fx-effect: dropshadow(gaussian, rgba(33,150,243,0.15), 8, 0, 0, 3);
}

.product-name {
    -fx-text-fill: #1976D2;
    -fx-font-size: 16px;
    -fx-font-weight: bold;
	}

.product-image {
    -fx-background-color: #f5f5f5;
    -fx-background-radius: 4;
    -fx-border-color: #e0e0e0;
    -fx-border-radius: 4;
    -fx-border-width: 1;
}

/* ========= 表单样式 ========= */
.form-label {
    -fx-text-fill: #424242;
    -fx-font-weight: bold;
}

.form-field {
    -fx-background-color: white;
    -fx-background-radius: 4;
    -fx-border-color: #bbdefb;
    -fx-border-radius: 4;
    -fx-border-width: 1;
    -fx-padding: 6 8 6 8;
	-fx-text-overflow: clip; 
	-fx-pref-width: 120px;
}

.form-field:focused {
    -fx-border-color: #2196F3;
    -fx-border-width: 2;
}

.form-textarea {
    -fx-background-color: white;
    -fx-background-radius: 4;
    -fx-border-color: #bbdefb;
    -fx-border-radius: 4;
    -fx-border-width: 1;
    -fx-padding: 6 8 6 8;
	-fx-text-overflow: clip;
	-fx-pref-width: 250px;
	-fx-pref-row-count: 2;
}

.form-textarea:focused {
    -fx-border-color: #2196F3;
    -fx-border-width: 2;
}

/* 确保网格布局中的列可以正确扩展 */
.grid-pane {
    -fx-hgap: 10;
    -fx-vgap: 8;
}

.grid-pane .column-constraints {
    -fx-hgrow: always;
}

.status-checkbox {
    -fx-text-fill: #424242;
}

.status-checkbox:selected {
    -fx-text-fill: #2196F3;
}

.file-name-label {
    -fx-text-fill: #757575;
    -fx-font-style: italic;
}

/* ========= 对话框样式 ========= */
.dialog-container {
    -fx-background-color: white;
}

.dialog-title {
    -fx-text-fill: #1976D2;
    -fx-font-size: 16px;
    -fx-font-weight: bold;
    -fx-padding: 0 0 10 0;
}

.empty-label {
    -fx-text-fill: #757575;
    -fx-font-style: italic;
    -fx-alignment: center;
    -fx-padding: 30;
}

.scroll-pane {
    -fx-background-color: transparent;
}

.scroll-pane > .viewport {
    -fx-background-color: transparent;
}

/* 商店特定样式 */
.shop-menu-bar {
    -fx-background-color: transparent;
    -fx-padding: 0 10 0 0;
}

.shop-menu-bar .menu {
    -fx-text-fill: white;
}

.shop-menu-bar .menu:hover {
    -fx-background-color: rgba(255, 255, 255, 0.2);
}

.shop-menu-bar .menu-item {
    -fx-text-fill: #424242;
}

.shop-menu-bar .menu-item:hover {
    -fx-background-color: #e3f2fd;
}

.category-title {
    -fx-text-fill: #1976D2;
    -fx-font-size: 18px;
    -fx-font-weight: bold;
    -fx-padding: 0 0 15 0;
}

.product-price {
    -fx-text-fill: #e53935;
    -fx-font-size: 16px;
    -fx-font-weight: bold;
}

.product-stock {
    -fx-text-fill: #757575;
    -fx-font-size: 14px;
}

.product-desc {
    -fx-text-fill: #616161;
    -fx-font-size: 13px;
}

.quantity-spinner {
    -fx-pref-width: 80px;
}

.cart-item {
    -fx-background-color: #f9f9f9;
    -fx-background-radius: 5;
    -fx-border-radius: 5;
    -fx-border-color: #e0e0e0;
    -fx-border-width: 1;
}

.total-label {
    -fx-text-fill: #1976D2;
    -fx-font-size: 18px;
    -fx-font-weight: bold;
    -fx-padding: 10 0 0 0;
    -fx-alignment: center-right;
}

/* 书籍卡片样式 */
.book-card {
    -fx-background-color: #f9f9f9;
    -fx-border-color: #ddd;
    -fx-border-radius: 5px;
    -fx-background-radius: 5px;
    -fx-padding: 15px;
}

/* 书籍标题样式 */
.book-title {
    -fx-font-size: 16px;
    -fx-font-weight: bold;
    -fx-wrap-text: true;
}

/* 书籍作者样式 */
.book-author {
    -fx-font-size: 12px;
    -fx-text-fill: #666;
}

/* 可借状态样式 */
.book-available {
    -fx-font-size: 12px;
    -fx-text-fill: green;
}

.book-unavailable {
    -fx-font-size: 12px;
    -fx-text-fill: red;
}

/* 库存样式 */
.book-stock {
    -fx-font-size: 12px;
    -fx-text-fill: #666;
}
.overdue-status {
    -fx-text-fill: #d32f2f;
    -fx-font-weight: bold;
}

.normal-status {
    -fx-text-fill: #388e3c;
}
/* 分类标题样式 */
.category-title {
    -fx-font-size: 18px;
    -fx-font-weight: bold;
    -fx-padding: 10px 0;
}

/* 空列表提示样式 */
.empty-label {
    -fx-font-size: 16px;
    -fx-text-fill: #999;
    -fx-padding: 20px;
    -fx-alignment: center;
}

.gray-button {
    -fx-background-color: #B0B0B0;
    -fx-text-fill: white;
    -fx-pref-width: 120px;
    -fx-pref-height: 35px;
    -fx-font-weight: bold;
}
/* ========= 对话框表单样式 ========= */
.dialog-form {
    -fx-background-color: white;
    -fx-padding: 20px;
    -fx-background-radius: 8;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 10, 0, 0, 3);
}

.dialog-form .label {
    -fx-text-fill: #424242;
    -fx-font-weight: bold;
    -fx-font-size: 14px;
}

.dialog-form .text-field,
.dialog-form .comboBox {
    -fx-background-color: white;
    -fx-background-radius: 4;
    -fx-border-color: #bbdefb;
    -fx-border-radius: 4;
    -fx-border-width: 1;
    -fx-padding: 8 12 8 12;
    -fx-font-size: 14px;
}

.dialog-form .text-field:focused,
.dialog-form .comboBox:focused {
    -fx-border-color: #2196F3;
    -fx-border-width: 2;
}

.dialog-form .spinner {
    -fx-background-color: white;
    -fx-background-radius: 4;
    -fx-border-color: #bbdefb;
    -fx-border-radius: 4;
    -fx-border-width: 1;
}

.dialog-form .spinner:focused {
    -fx-border-color: #2196F3;
    -fx-border-width: 2;
}

.dialog-form .spinner .text-field {
    -fx-background-color: transparent;
    -fx-background-radius: 0;
    -fx-border-color: transparent;
    -fx-padding: 6 8 6 8;
}

/* 对话框按钮区域样式 */
.dialog-button-bar {
    -fx-padding: 15 0 0 0;
    -fx-spacing: 10;
    -fx-alignment: center-right;
}

/* 书籍管理特定样式 */
.book-management-dialog {
    -fx-background-color: white;
    -fx-padding: 20;
    -fx-spacing: 15;
    -fx-background-radius: 8;
    -fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 10, 0, 0, 3);
}

.book-management-dialog .header {
    -fx-text-fill: #1976D2;
    -fx-font-size: 18px;
    -fx-font-weight: bold;
    -fx-padding: 0 0 10 0;
}

/* 借阅人表格样式 */
.borrowers-table {
    -fx-background-color: white;
    -fx-border-color: #e0e0e0;
    -fx-border-width: 1;
    -fx-border-radius: 4;
}

.borrowers-table .column-header {
    -fx-background-color: #e3f2fd;
    -fx-text-fill: #1976D2;
    -fx-font-weight: bold;
}

.borrowers-table .table-row-cell:even {
    -fx-background-color: #f9f9f9;
}

.borrowers-table .table-row-cell:odd {
    -fx-background-color: white;
}

.borrowers-table .table-row-cell:hover {
    -fx-background-color: #e3f2fd;
}

/* 书籍卡片操作按钮样式 */
.book-card-buttons {
    -fx-spacing: 8;
    -fx-alignment: center-right;
}

/* 类别下拉框样式 */
.category-comboBox {
    -fx-background-color: white;
    -fx-background-radius: 4;
    -fx-border-color: #bbdefb;
    -fx-border-radius: 4;
    -fx-border-width: 1;
    -fx-padding: 8 12 8 12;
    -fx-font-size: 12px;
}

.category-comboBox:focused {
    -fx-border-color: #2196F3;
    -fx-border-width: 2;
}

/* 搜索面板样式 */
.search-panel {
    -fx-background-color: #e3f2fd;
    -fx-background-radius: 8;
    -fx-padding: 15;
    -fx-spacing: 10;
}

.search-panel .label {
    -fx-text-fill: #0D47A1;
    -fx-font-weight: bold;
}



/* 借阅日期样式 */
.borrow-date {
    -fx-text-fill: #0D47A1;
    -fx-font-size: 12px;
}

/* 归还期限样式 */
.due-date {
    -fx-text-fill: #0D47A1;
    -fx-font-size: 12px;
}
